﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Model
{   
    [Serializable]
    public class WorkNodeItem{
        private string guideWord;
        private string deviation;
        private string causes;
        private string consequences;
        private string safeguards;
        private string s1;
        private string l1;
        private string rr1;
        private string recType;
        private string recNum;
        private string recommendations;
        private string s2;
        private string l2;
        private string rr2;
        private string personName;
        private string finishDate;

        public WorkNodeItem(){}
        public WorkNodeItem(string guideWord, string deviation, string causes, string consequences, string safeguards, string s1, string l1, string rr1, string recType, string recNum, string recommendations, string s2, string l2, string rr2, string personName, string finishDate)
        {
            this.guideWord = guideWord;
            this.deviation = deviation;
            this.causes = causes;
            this.consequences = consequences;
            this.safeguards = safeguards;
            this.s1 = s1;
            this.l1 = l1;
            this.rr1 = rr1;
            this.recType = recType;
            this.recNum = recNum;
            this.recommendations = recommendations;
            this.s2 = s2;
            this.l2 = l2;
            this.rr2 = rr2;
            this.personName = personName;
            this.finishDate = finishDate;
        }

        public string GuideWord
        {
            get { return guideWord; }
            set { guideWord = value; }
        }

        public string Deviation
        {
            get { return deviation; }
            set { deviation = value; }
        }

        public string Causes
        {
            get { return causes; }
            set { causes = value; }
        }

        public string Consequences
        {
            get { return consequences; }
            set { consequences = value; }
        }

        public string Safeguards
        {
            get { return safeguards; }
            set { safeguards = value; }
        }

        public string S1
        {
            get { return s1; }
            set { s1 = value; }
        }

        public string L1
        {
            get { return l1; }
            set { l1 = value; }
        }

        public string Rr1
        {
            get { return rr1; }
            set { rr1 = value; }
        }

        public string RecType
        {
            get { return recType; }
            set { recType = value; }
        }

        public string RecNum
        {
            get { return recNum; }
            set { recNum = value; }
        }

        public string Recommendations
        {
            get { return recommendations; }
            set { recommendations = value; }
        }

        public string S2
        {
            get { return s2; }
            set { s2 = value; }
        }

        public string L2
        {
            get { return l2; }
            set { l2 = value; }
        }

        public string Rr2
        {
            get { return rr2; }
            set { rr2 = value; }
        }

        public string PersonName
        {
            get { return personName; }
            set { personName = value; }
        }

        public string FinishDate
        {
            get { return finishDate; }
            set { finishDate = value; }
        }

         public override bool Equals(object obj){
            if(obj != null && obj is WorkNodeItem){
                WorkNodeItem p = (WorkNodeItem) obj;
                if(this.guideWord == p.guideWord && this.deviation == p.deviation && this.causes == p.causes
                    && this.consequences == p.consequences && this.safeguards == p.safeguards && this.s1 == p.s1 && this.l1 == p.l1
                    && this.rr1 == p.rr1 && this.recType == p.recType && this.recNum == p.recNum && this.recommendations == p.recommendations
                    && this.s2 == p.s2 && this.l2 == p.l2 && this.rr2 == p.rr2 && this.personName == p.personName && this.finishDate == p.finishDate){
                    return true;
                }
            }
            return false;
         }
    }
}
